#include <reg52.h>
#include "Delay.h"

sbit LED = P2^0 ;

char up_1[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
char down_1[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};

void LED_left(int x) // left 是从左到右流水开始
{	
	char i;
	
	while(x)
  {
	for(i=0;i<8;i++)
	{
    P2=up_1[i];     //从左向右
	  Delay(50);
	 
	}  
	  
	for(i=0;i<8;i++)
	{
    P2=down_1[i];  // 从右向左
	  Delay(50);
	}
	x--;
	LED=1;
  }

}